package com.jfs.qy.entity.request;

import com.alibaba.fastjson2.annotation.JSONField;
import lombok.Data;

import java.io.Serializable;

/**
 * @Description 查询告警rtsp地址请求对象数据
 * @E-mail cwm3412638@163.com
 * @Author cwm
 * @Date 2022/11/5
 */
@Data
public class SearchAlarmRtspUrlRequestData implements Serializable {
    /**
     * 通道名称
     */
    private String channel;
    /**
     * 固定范围 "tcp"、"udp"、"http"、"https"
     */
    @JSONField(name = "transport_type")
    private String transportType;
    /**
     * 固定选项 "Mainstream","Substream"
     */
    @JSONField(name = "stream_mod")
    private String streamMod;
    /**
     * 时间 UTC时间 format 必须为：YYYY-MM-DD
     */
    @JSONField(name = "start_date")
    private String startDate;

    /**
     * 时间 UTC时间 format 必须为：hh:mm:ss
     */
    @JSONField(name = "start_time")
    private String startTime;
    /**
     * 时间 UTC时间 format 必须为：YYYY-MM-DD
     */
    @JSONField(name = "end_date")
    private String endDate;
    /**
     * 时间 UTC时间 format 必须为：hh:mm:ss
     */
    @JSONField(name = "end_time")
    private String endTime;

    /**
     * 告警类型
     * 1<<0        (计划录像)
     * 1<<2        (移动侦测录像)
     * 1<<3        (IO告警录像)
     * 1<<4        (越线检测告警录像)
     * 1<<7        (智能告警录像)
     * 1<<9        (入侵检测告警录像)
     * 1<<17       (声音告警录像)
     * 1<<18       (手动录像)
     * 1<<20       (遮挡告警录像)
     * 1<<10(目标参数告警录像)
     * 1<<11(过线统计告警录像)
     * 1<<12(区域进入检测告警录像)
     * 1<<13(区域离开检测告警录像)
     * 1<<14(快速移动告警录像)
     * 1<<15(徘徊检测告警录像)
     * 1<<19(排队长度告警录像)
     * 1<<21(人群密度告警录像)
     * 1<<22(口罩识别告警录像)
     * 1<<23(第三方算法告警录像)
     * 1<<24(违法停车检测告警录像)
     * 1<<25(人员频次告警录像)
     * 1<<26(物品遗留告警录像)
     * 1<<27(物品移动告警录像)
     * 1<<28(电瓶车告警录像)
     * 1<<29(离岗检测告警录像)
     * 0x7FFFFFFE  (所有报警录像)
     * 0xFFFFFFFF  (所有录像)
     */
    @JSONField(name = "record_type")
    private long recordType;

    /**
     * 私有构造方法
     */
    private SearchAlarmRtspUrlRequestData(Builder builder) {
        this.startTime = builder.startTime;
        this.endTime = builder.endTime;
        this.endDate = builder.endDate;
        this.recordType = builder.recordType;
        this.startDate = builder.startDate;
        this.channel=builder.channel;
        this.streamMod=builder.streamMod;
        this.transportType = builder.transportType;
    }

    public static class Builder {
        public Builder() {
        }

        private String channel;
        private String transportType;
        private String streamMod;
        private String startDate;
        private String startTime;
        private String endDate;
        private String endTime;
        private long recordType;

        public Builder channel(String channel) {
            this.channel = channel;
            return this;
        }

        public Builder transportType(String transportType) {
            this.transportType = transportType;
            return this;
        }

        public Builder streamMod(String streamMod) {
            this.streamMod = streamMod;
            return this;
        }

        public Builder startDate(String startDate) {
            this.startDate = startDate;
            return this;
        }

        public Builder startTime(String startTime) {
            this.startTime = startTime;
            return this;
        }

        public Builder endDate(String endDate) {
            this.endDate = endDate;
            return this;
        }

        public Builder endTime(String endTime) {
            this.endTime = endTime;
            return this;
        }

        public Builder recordType(long recordType) {
            this.recordType = recordType;
            return this;
        }
        public SearchAlarmRtspUrlRequestData build(){
            return new SearchAlarmRtspUrlRequestData(this);
        }
    }

}
